print('=== 猜数字游戏 ===')
print('请猜想一个1到1000之间的整数,我来猜猜看')
start = 1
end = 1000
guess = (start + end) // 2
count = 0
while True:
    print("我猜的数字是：", guess)
    count += 1
    info = int(input('请提示(1=大了,2=小了,3=对了)：'))
    if info == 1:
        end = guess
        guess = (start + end) // 2
    elif info == 2:
        start = guess
        guess = (start + end) // 2
    else:
        print(f'恭喜我猜对了！我用了{count}次猜中')
        break
